package com.exam.enums;

import lombok.Getter;

/**
 * Created by v
 * Date:2019/1/6
 * Time:20:48
 */
@Getter
public enum  ResultEnum {

    USER_REGISTER_ERROR(1, "参数不正确"),
    SEND_MESSAGE_ERROR(2, "验证码发送失败"),
    COOKIE_NOT_FIND(3, "cookie中找你不到token"),
    REDIS_NOT_FIND(4, "redis中找不到token"),

    PARAM_ERROR(10, "参数错误"),
    USERID_NOT_FIND(11, "用户id找不到"),
    QUESTION_USED(15, "题目已被引用"),
    QUESTION_ID_ERROR(16, "题目id格式有误"),
    UNLOGIN(17, "用户未登录"),

    PAID_FAIL(20, "fail"),
    CHARGE_FREE(21, "free"),
    NO_FREE(22, "nofree"),
    NO_AUTH(23, "权限不足")
    ;


    private Integer code;

    private String message;

    ResultEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
